Skip to content

Conversation

@kevinoid
Copy link

@kevinoid kevinoid commented Feb 4, 2017

This commit adds a failAfterTime method to Backoff (and FunctionCall) to allow limiting the total elapsed time. The primary intended use case is when the caller has a deadline which can not be exceeded during which to retry an operation with backoff and the number of backoffs can not be
calculated in advance (e.g. because the operation takes a variable amount of time). In my current use case, this is calling a REST API using backoff up to a deadline.

Thanks for considering,
Kevin

This commit adds the failAfterTime method to Backoff (and FunctionCall)
to allow limiting the total elapsed time.  The primary intended use case
is when the caller has a deadline which can not be exceeded during which
to retry an operation with backoff and the number of backoffs can not be
calculated in advance (e.g. because the operation takes a variable
amount of time).

Signed-off-by: Kevin Locke <[email protected]>
@kevinoid
Copy link
Author

Ping. Thoughts?

@alizain
Copy link

alizain commented Feb 26, 2017

@MathieuTurcotte ping?

@MathieuTurcotte
Copy link
Owner

The change makes sense at a glance. I'll try to take a closer look this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants